﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ISuspendable.cs" company="">
//   
// </copyright>
// <summary>
//   The Suspendable interface.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

using System;

namespace Libium.Core
{
    /// <summary>
    ///   The Suspendable interface.
    /// </summary>
    public interface ISuspendable
    {
        event Action<ISuspendable> BeforeSuspend;
        event Action<ISuspendable> AfterSuspend;
        event Action<ISuspendable> BeforeResume;
        event Action<ISuspendable> AfterResume;

        #region Public Properties

        /// <summary>
        ///   Gets a value indicating whether is suspended.
        /// </summary>
        bool IsSuspended { get; }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        ///   The resume.
        /// </summary>
        void Resume();

        /// <summary>
        ///   The suspend.
        /// </summary>
        void Suspend();

        #endregion
    }
}